package org.sipsl.gisystems.gentest.junit;
 
import static org.junit.Assert.*;

import java.math.BigDecimal;
import java.util.ArrayList;

import org.junit.Test;
import org.sipsl.gisystems.gentest.RteVoiceMoTestUnit;
import org.sipsl.gisystems.rte.V2.TestsuiteV2.VoiceBatchGroup.Duration;
import org.sipsl.gisystems.rte.V2.TestsuiteV2.VoiceBatchGroup.Zone.VoiceBatch;
import org.sipsl.gisystems.rte.V2.TestsuiteV2.VoiceBatchGroup.Zone.VoiceBatch.VoiceBundle;
import org.sipsl.gisystems.rte.V2.TestsuiteV2.VoiceBatchGroup.Zone.VoiceBatch.VoiceTariff;

public class TestVoiceBatch {

	@Test
	public void testRteVoiceMoTestUnit() {
		//fail("Not yet implemented");
	}
	
	@Test
	public void testGetSpending() {
		RteVoiceMoTestUnit rte = new RteVoiceMoTestUnit();
		
		VoiceBatch simply = new VoiceBatch();
		simply.setId("simply");
		simply.setNewBundleLogic("YES");
		VoiceTariff vt = new VoiceTariff();
		vt.setMin(60);
		BigDecimal uffa = new BigDecimal(0.25);
		vt.setPrice(uffa);
		vt.setSlice(60);
		simply.getVoiceTariff().add(vt); 
		Duration dt = new Duration();
		dt.setTime(30);
//		assertEquals("Price for 30 sec call in Simpy is ",25000,rte.getSpending(simply, dt, 30));
//		assertEquals("Price for 60 sec call in Simpy is ",25000,rte.getSpending(simply, dt, 60));
//		assertEquals("Price for 100 sec call in Simpy is ",50000,rte.getSpending(simply, dt, 100));
//		assertEquals("Price for 120 sec call in Simpy is ",50000,rte.getSpending(simply, dt, 120));


		
//		assertEquals("30 with slice = 60, must be 60", 60, rte.getSpending(tariff, durationCmpx, duration)(30, 60));
//		assertEquals("30 with slice = 1, must be 30", 30, rte.upDurationToMultipleOfSlice(30, 1));
//		assertEquals("100 with slice = 60, must be 120", 120, rte.upDurationToMultipleOfSlice(100, 60));
	}

	@Test
	public void testGenerateTest() {
		//fail("Not yet implemented");
	}

	@Test
	public void testUpDurationToMultipleOfSlice() {
		RteVoiceMoTestUnit rte = new RteVoiceMoTestUnit();
		assertEquals("30 with slice = 60, must be 60", 60, rte.upDurationToMultipleOfSlice(30, 60));
		assertEquals("30 with slice = 1, must be 30", 30, rte.upDurationToMultipleOfSlice(30, 1));
		assertEquals("100 with slice = 60, must be 120", 120, rte.upDurationToMultipleOfSlice(100, 60));
		//fail("Not yet implemented");
	}

	@Test
	public void testGenerateDocVoice() {
		//fail("Not yet implemented");
	}

}
